Two-Factor Analysis of Variance (ANOVA) – Independent Measures

What are two-factor ANOVA Independent Measures?

Two-Factor Analysis of Variance (ANOVA) - Independent Measures

  • More than one-factor analysis is called a factorial design
  • ANOVA with two independent variables is called a two-factor design.
  • Such a design can be presented in a table with the levels of one factor defining the rows and the levels of the other factor defining the columns.
  • Each cell in the matrix corresponds to a specific combination of the two factors.

Remember the below concepts before starting the session.

    • Introduction to analysis of variance
    • The logic of analysis of variance
    • ANOVA notation and formulas
    • Distribution of F-ratios

Assumptions for the Two-Factor ANOVA

  1. The observations within each sample must be independent
  2. The populations from which the samples are selected must be normal
  3. The populations from which the samples are selected must have equal variances (homogeneity of variance)

Example :

Four groups of people were formed to measure Health scores. Refer to the below photograph:

  1. Two groups were served vegetarian Food & the other two were served Seafood.
  2. Two groups were involved in daily exercise & other two were not doing any exercise.

After a certain period, their health was checked and a Health score was calculated for each group on a sample basis. Now we have to find out the effect of treatments (Food & Exercise) on people’s Health scores.

Note:-This example has been designed to explain the concept only.


Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Solution:

There are two independent variables Food & Exercise. Each variable has two levels. Therefore analysis for this exercise will be a Two-factor analysis.

Factor A 🡺 Food

    1. Level 1 – Vegetarian food
    2. Level 2 – Sea Food

Factor B 🡺 Exercise

    1. Level 1 – with Exercise
    2. Level 2- NO Exercise
  • The level of Food is defining the rows. The first row is of Vegetarian food. The second row is for Seafood.
  • Levels of Exercise are defining the columns. The first column is representing a group of people doing daily exercise. The second column is representing a group of people doing NO exercise.
  • Each cell in the matrix corresponds to a specific combination of the two factors i.e. Food & Exercise. Refer to the below image.

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


  • Health parameters are measured and values are put in the respective cells.
  • The purpose of the ANOVA is to determine whether there are any significant mean differences among the treatment conditions.

These treatment effects are classified as follows:

  • The A-effect: Overall mean differences among the levels of factor A.
  • The B-effect: Overall mean differences among the levels of factor B.
  • The A × B interaction: Extra mean differences that are not accounted for by the main effects.

Main effect

  • The mean differences among the levels of one factor are referred to as the main effect of that factor.

One factor determines the rows and the second factor determines the columns,

  • Mean differences among the rows describe the main effect of one factor
  • Mean differences among the columns describe the main effect of the second factor
  • The evaluation of main effects accounts for two of the three hypothesis tests in a two-factor ANOVA.

Interaction effect

  • When the effect of one factor depends on the different levels of a second factor, then there is an interaction between the factors

Significant interaction

  • A significant interaction means that the effect of one factor depends on the levels of the second factor.
  • Evaluating the simple main effects of the factor can provide a complete description of the effect of that factor including its interaction with the second factor.
  • Large individual differences within a treatment often can be reduced by using a participant variable, such as age or gender, as an additional factor.
  • The goal of the study is to evaluate the mean differences that may be produced by either of these factors acting independently or by the two factors acting together.

The two-factor ANOVA produces three F-ratios:

  • One for factor A,
  • One for factor B,
  • One for the A × B interaction

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Calculate the mean of the individual group’s health score output:

  • μA1 = Mean Effect of treatment on population because of level A1 (Vegetarian food)
  • μA2 = Mean Effect of treatment on population because of level A2 (Seafood)

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


μB1 = Mean Effect of treatment on population because of level B1 (Daily Exercise)

μB2 = Mean Effect of treatment on population because of level B2 (NO Exercise)

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Null hypothesis

  • There is no difference because of the two levels of Food. It has no effect on the Health score.

H0 : μA1 = μA2

        • μA1: Vegetarian
        • μA2: Sea Food
  • There is no difference because of Exercise. It has no effect on the Health score.

H0 : μB1 = μB2

        • μB1: Daily Exercise
        • μB2: NO Exercise

The alternative hypothesis

  • Two foods produce different Health scores

H1 : μA1 ≠ μA2

  • Two Exercise behaviour produce different Health scores

H1 : μB1 ≠ μB2


Hypothesis calculations


Calculate Factor A parameters

Factor A (level – Vegetarian Food) – M1, T1 , SS1 & M2 , T2 , SS2

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Calculate G and the sum of X*X

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Calculate Factor B parameters

Factor A (level – Sea Food ) – M3, T3 , SS3 & M4 , T4 , SS4

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Calculate:Total sum of square SStotal

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Calculate the Total degree of freedom  

df = N-1

df = 32 – 1

df = 31


Within-Treatments variability

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Calculate  within treatment degree of freedom  

df = df1 + df2 + df3 + df4

df = (8-1) + (8-1) + (8-1) + (8-1)

df = 28


Calculate between-Treatments variability

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Alternate way – between-Treatments variability calculation

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Calculate between degree of freedom

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Analysis of factor A: calculate SS for factor A

Two-Factor Analysis of Variance (ANOVA) - Independent Measures

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Calculate degree of freedom for factor A

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Analysis of factor A: calculate SS for factor B

Two-Factor Analysis of Variance (ANOVA) - Independent Measures

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Calculate degree of freedom for factor B

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Analysis of interaction: calculate SS- A X B

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Calculate the degree of freedom for interaction A X B

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Calculate within Mean Squares: MS within 

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Calculate Mean Squares: Factor A, B & Interaction A X B 

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


F-Ratio : Factor A

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


F-Ratio : Factor B

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


F-Ratio: Interaction A X B

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


F value from Table-1

  • Numerator df =1
  • Denominator df =28

At α = .05 : F(1,28) = 4.20

At α = .01 : F(1,28) = 7.64

  • Factor A: F ratio 0.85 does not exceed both of the critical values – No significant effect
  • Factor B: F ratio 24.3 exceeds both of the critical values – Has a significant effect
  • Interaction A X B: F ratio -0.095 does not exceed both of the critical values – No significant effect

Summary table for the complete two-factor ANOVA

Two-Factor ANOVA -Effect Size measurement

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Two-Factor ANOVA -Effect Size measurement

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


For Factor A : η2 =

Two-Factor Analysis of Variance (ANOVA) - Independent Measures

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


For Factor B η2 =

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


For Interaction A X B: η2 =

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Table-1 : F-Ratio Table with Alpha = 0.05

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Table-2 : F-Ratio Table with Alpha = 0.01

Two-Factor Analysis of Variance (ANOVA) - Independent Measures


Scroll to Top